﻿using _1_Interfaces.Models.Dtos.Cjw;
using _1_Interfaces.Models.Tables.Cjw;
using System;
using System.Collections.Generic;
using System.Text;

namespace _1_Interfaces.Interfaces.Cjw
{
    /// <summary>
    /// 文章和轮播图列表服务
    /// </summary>
    public interface IArticleListService
    {
        /// <summary>
        /// 获取文章列表
        /// </summary>
        /// <param name="articleTitle">文章标题 模糊查询</param>
        /// <param name="state">文章的状态 -1关闭 0全部 1正常</param>
        /// <param name="value">-1轮播图 0全部 1文章</param>
        /// <param name="pageIndex">第几页</param>
        /// <param name="pageSize">一页几条</param>
        /// <returns></returns>
        ArticleListDto GetArticleList(string articleTitle, int state, int value, int pageIndex, int pageSize);

        /// <summary>
        /// 添加文章
        /// </summary>
        /// <param name="articleList">文章实体，id和时间不用传，后端赋值</param>
        /// <returns></returns>
        bool AddArticle(ArticleList articleList);

        /// <summary>
        /// 编辑文章
        /// </summary>
        /// <param name="articleList">文章实体，时间不用传，后端赋值成修改时间</param>
        /// <returns></returns>
        bool EditArticle(ArticleList articleList);

        /// <summary>
        /// 删除文章
        /// </summary>
        /// <param name="articleId">文章id</param>
        /// <returns></returns>
        bool DelArticle(int articleId);

        /// <summary>
        /// 获取文章详情
        /// </summary>
        /// <param name="articleId">文章id</param>
        /// <returns></returns>
        ArticleList GetArticleDetail(int articleId);
    }
}
